from selenium.webdriver.common.by import By
from Datas.GobalDatas import gobal_datas as GD


class LoginLocator:
    """
    登录元素定位地址
    """
    username_loc = (By.XPATH, "//*[@placeholder='请输入手机号码']")  # 元素用户名输入框locator
    password_loc = (By.XPATH, "//*[@placeholder='请输入密码']")  # 元素密码输入框locator
    click_login = """document.evaluate('//*[text()="登 录"]', document).iterateNext().click();"""
    switch_company = f"""document.evaluate('//*[text()="{GD.CROP_NAME}"]/../../../../..//*[text()="探迹营销"]', document).iterateNext().click();"""
    # error_msg_loc = (By.CLASS_NAME, 'el-message__content')
